// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "WGINavItem.generated.h"


class UWGI_UserWidget;
/**
 *
 */
UCLASS()
class WIDGETGROUP_API UWGI_NavItem : public UUserWidget
{
	GENERATED_BODY()

public:
	/**
	 * 子物件被选中时
	 */
	UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, BlueprintCosmetic, Category = "WGI|Nav")
		void OnSelectEvent();
	/**
	 * 子物件被取消选中时
	 */
	UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, BlueprintCosmetic, Category = "WGI|Nav")
		void OnUnSelectEvent();
	/**
	 * 子物件被EnterKey 执行
	 */
	UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, BlueprintCosmetic, Category = "WGI|Nav")
		void OnClickEvent();

	/**
	 * 选择子物件，再子物件没有被选中时，将会执行 OnSelectEvent
	 *
	 * - bCallEventWhenSelected: 是否在子物件已经被选中的情况下继续执行 Select Event
	 */
	UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "WGI|Nav")
		void SelectThisChild(bool bCallEventWhenSelected, bool bJoinTheCache);

	void SetOwnerWGI(UWGI_UserWidget* InOwner);
private:
	UWGI_UserWidget* OwnerWGI;
};
